/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bff.mpd.musicjukebox.ui.components;

import com.bff.mpd.musicjukebox.lib.actions.NextAction;
import javax.swing.ImageIcon;

/**
 *
 * @author bfindeisen
 */
public class NextButton extends PlayerButton {

    private ImageIcon icon_hover;
    private ImageIcon icon_pressed;
    private ImageIcon icon_end;

    public NextButton() {
        super();

        icon_hover = new ImageIcon(getClass().getResource("/resources/mpd/player_end_hover.png"));
        icon_pressed = new ImageIcon(getClass().getResource("/resources/mpd/player_end_press.png"));
        icon_end = new ImageIcon(getClass().getResource("/resources/mpd/player_end.png"));

        setText(null);
        setContentAreaFilled(false);
        setBackground(java.awt.Color.lightGray);
        setBorder(null);
        setFocusPainted(false);
        setMaximumSize(new java.awt.Dimension(32, 32));
        setMinimumSize(new java.awt.Dimension(32, 32));
        setPreferredSize(new java.awt.Dimension(32, 32));
    }

    @Override
    protected void setMousePressedIcon() {
        setIcon(icon_pressed);
    }

    @Override
    protected void setMouseEnteredIcon() {
        setIcon(icon_hover);
    }

    @Override
    protected void setMouseExitedIcon() {
        setIcon(icon_end);
    }

    @Override
    protected void setAction() {
        setAction(new NextAction(getPlayer()));
    }

    @Override
    protected void setMouseReleasedIcon() {
         setIcon(icon_hover);
    }
}
